package com.linser.gistools.refactoring.javafx.treeitem;

import javafx.scene.Node;
import javafx.scene.control.TreeItem;

import java.io.File;

/**
 * @author: linser
 * @Desc: 数据库类型的 TreeItem
 * @create: 2024-01-26
 */
public class DBTypeTreeItem extends TreeItem<String> {
    private File treeItemFile;

    private String dataBaseType;

    public DBTypeTreeItem() {
        super();
    }

    public DBTypeTreeItem(String value) {
        super(value);
        this.dataBaseType = value;
    }
    /**
     * Creates a TreeItem with the value property set to the provided object, and
     * the graphic set to the provided Node.
     *
     * @param value The object to be stored as the value of this TreeItem.
     * @param graphic The Node to show in the TreeView next to this TreeItem.
     */
    public DBTypeTreeItem(String value, final Node graphic) {
        super(value,graphic);
        this.dataBaseType = value;
    }


    public String getDataBaseType(){
        if(this.dataBaseType != null){
            return this.dataBaseType;
        }else {
            return this.getValue();
        }

    }
    public void setDataBaseType(String dataBaseType){
        this.dataBaseType = dataBaseType;
    }
}
